<?php
/**
 * 网站路由配置文件。
 *
 * @author    Fairyin <fairyin@126.com>
 * @copyright © 2016 www.imcn.vip
 * @version   v1.0
 */

Route::get('/', 'IndexController@onGet');
Route::get('list', 'ListController@onGet');
Route::get('list.html', 'ListController@onGet');
Route::get('detail/{id}.html', 'DetailController@onGet');
Route::post('detail/{id}/visit', 'DetailController@onPost');
Route::get('shadow/login', 'Shadow\LoginController@onGet');

Route::group(["prefix" => "shadow", "middleware" => 'shadow'], function() {
    Route::get('/', 'Shadow\IndexController@onGet');
    Route::get('/index', 'Shadow\IndexController@onGet');
    Route::get('logout', 'Shadow\LogoutController@onGet');
    Route::get('/power/add', 'Shadow\PowerController@add');
    
    Route::get('/upload', 'Shadow\ImageUploadController@onGet');
    Route::post('/upload', 'Shadow\ImageUploadController@upload');
    
    Route::get('/photo/tag', 'Shadow\TagController@onGet');
    Route::post('/photo/tag', 'Shadow\TagController@onPost');
    
    Route::get('/photo/type', 'Shadow\TypeController@onGet');
    Route::post('/photo/type', 'Shadow\TypeController@onPost');
    
    Route::get('/photo/album', 'Shadow\AlbumController@onGet');
    Route::post('/photo/album', 'Shadow\AlbumController@onPost');
    
    Route::get('/photo/detail/{id}', 'Shadow\PhotoDetailController@onGet');
    Route::post('/photo/detail/{id}', 'Shadow\PhotoDetailController@onPost');    
});
